//Header file for groovey class container

//anatomy of a groovey system:

/////////////////////////////////////////////////////////////////////
//					Transformer list -- Transformers               //
//				   /  								               //
//Groovey System: O--Particle List 	 -- Particle Sets  -- Particles//
//				   \								               //
//					Renderer  List	 -- Renderers                  //
/////////////////////////////////////////////////////////////////////

//Complicated, huh?

#ifndef GROOVEY
#define GROOVEY

#include "gparticle_list.hpp"
#include "gtransformer_list.hpp"
#include "grenderer_list.hpp"
#include <boost/numeric/ublas/vector.hpp>
#include <boost/thread.hpp>

class Groovey{
    public:
    	Groovey(void (*Render_Driver)(), void (*Transform_Driver)());
    	~Groovey();
    	
    	///pre: We assume that if you feed this guy lists, they are finished getting set up
    	
    	void Feed(GParticle_List& GPlist);
    	void Feed(GTransformer_List& GTlist);
    	void Feed(GRenderer_List& GRlist);
    	///post: Each respective feed will either define or redefine the current particle list of a Groovey System
    	
    	///pre: the caller is ready to give execution to groovey. If not, we'll later overload this so that the caller
    	//////can do additional outside operations (such as IO foo)
    	void letsRoll(int argc, char **argv);///result:Groovey starts (for now) a transform thread and a rendering thread.
    					/////////later, we'll have letsRoll also spawn a micro-managing thread to help more
    					/////////complicated interactions along and all.
    	void renderParticles();
    	
    	void transformLoop();
    //////
	//////Privates:
	//////
    private:
    	GParticle_List *p_list;
    	GTransformer_List *t_list;
    	GRenderer_List *r_list;
    	void (*rdrvr)();
    	void (*tdrvr)();
    	
    	bool renderActive;
};

#endif
